import request from '@/utils/request'

// 查询仓库列表
export function listCustomer(query) {
  return request({
    url: '/om/customer/list',
    method: 'get',
    params: query
  })
}

// 导出客户
export function exportCustomer(query) {
  return request({
    url: '/om/customer/export',
    method: 'get',
    params: query
  })
}

// 新增客户
export function addCustomer(data) {
  return request({
    url: '/om/customer',
    method: 'post',
    data: data
  })
}

// 修改客户
export function updateCustomer(data) {
  return request({
    url: '/om/customer',
    method: 'put',
    data: data
  })
}

// 删除客户
export function delCustomer(name) {
  return request({
    url: '/om/customer/' + name,
    method: 'delete'
  })
}

// 字典
export function dictMatching (query) {
  return request({
    url: '/system/dict/data/list',
    method: 'get',
    params: query
  })
}

// 清空
export function emptyFile() {
  return request({
    url: '/om/customer/dump',
    method: 'get',
  })
}
